import { NOT_LOGIN } from '@/access/accessEnum'

export const routes = [
  {
    path: '/',
    name: 'basicLayout',
    component: () => import('@/layouts/BasicLayout.vue'),
    children: [
      {
        path: '',
        name: '首页',
        component: () => import('@/views/HomeView.vue'),
        meta: {
          access: NOT_LOGIN,
          hidden: false,
        },
      },
      {
        path: 'about',
        name: '关于',
        component: () => import('../views/AboutView.vue'),
        meta: {
          access: NOT_LOGIN,
          hidden: false,
        },
      },
    ],
  },
  {
    path: '/user',
    name: 'userLayout',
    component: () => import('../layouts/UserLayout.vue'),
    children: [
      {
        path: 'login',
        name: '登录',
        component: () => import('@/views/user/UserLoginView.vue'),
        meta: {
          access: NOT_LOGIN,
        },
      },
      {
        path: 'register',
        name: '注册',
        component: () => import('../views/user/UserRegisterView.vue'),
        meta: {
          access: NOT_LOGIN,
        },
      },
    ],
  },
]
